import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
// import PresentView from '../views/PresentView.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/Login',
    name: 'Login',
    component: Login,
  },
  {
    path: '/',
    name: 'Cover',
    component:() => import('../components/CoverBody.vue')
  },
  {
    path: '/Register',
    name: 'Register',
    component: Register
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/present',
    name: 'present',
    component:() => import('../views/PresentView.vue'),
    children:[
      {
        path: 'Main',
        name: 'Main',
        component:() => import('../views/MainView.vue')
      },
      {
        path: 'Qianming',
        name: 'Qianming',
        component:() => import('../components/SigningCertificates.vue')
      },
      {
        path: 'Quanxian',
        name: 'Quanxian',
        component:() => import('../components/Permissions.vue')
      },
      {
        path: 'List',
        name: 'List',
        component:() => import('../views/ListView.vue')
      },
      {
        path: 'URL',
        name: 'URL',
        component:() => import('../components/URLRole.vue')
      },
    ],
  },
  {
    path: '/demo',
    name: 'demo',
    component:() => import('../views/Demo.vue'),
    children:[
      {
        path: 'main',
        name: 'main',
        component:() => import('../views/DemoView.vue')
      },
      {
        path: 'listmain',
        name: 'listmain',
        component:() => import('../views/DemoList.vue')
      },
      {
        path: 'qianming',
        name: 'qianming',
        component:() => import('../components/DemoSign.vue')
      },
      {
        path: 'quanxian',
        name: 'quanxian',
        component:() => import('../components/DemoPermissions.vue')
      },
      {
        path: 'list',
        name: 'list',
        component:() => import('../views/ListView.vue')
      },
      {
        path: 'url',
        name: 'url',
        component:() => import('../components/DemoURL.vue')
      },
    ],
  },
  {
    path: '/lastanalyse',
    name: 'lastanalyse',
    component:() => import('../components/LastAnalyse.vue')
  },
  {
    path: '/about',
    name: 'about',
    component:() => import('../components/AboutApp.vue')
  },
  {
    path: '/contact',
    name: 'contact',
    component:() => import('../components/contact.vue')
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
